/*
 * @Brief   : 配置文件类
 * @Date    : 2024-09-14
 * @Author  : wxc
 *
 * Copyright (c) 2024 by 神工仿真, All Rights Reserved.
 */
#pragma once

#include <string>

#include "Utility/Configuration/SGConfigurationExport.h"
#include "Utility/Configuration/SGParameter.h"

namespace SG::Utility
{
    // 配置文件名称
    static const std::string CONFIG_FILE_NAME = "sgsim.conf";

    class Utility_Configuration_DECLSPEC SGConfig
    {
      public:
        /// @brief 获取实例
        /// @return
        static SGConfig& GetInstance ();

        /// @brief 获取配置的数据
        /// @return
        SGParameter& GetData ();

      private:
        SGConfig (const std::string& config = "");
        ~SGConfig () = default;

        /// @brief 读取指定配置文件
        /// @param config
        bool LoadConfig (const std::string& config);

        /// @brief 导入后对数据进行处理
        // bool postData ();

        /// @brief 配置的数据
        SGParameter m_data;
    };

}  // namespace SG::Utility